package com.qclix.inv;

import java.io.Serializable;


public class Client implements Serializable {

    private long id;
    private String name;
    private String street1;
    private String street2;
    private String zip;
    private String city;
    private String country;
    private String vat;

    public long getId() {
        return id;
    }

    public void setId(long value) {
        this.id = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String value) {
        this.name = value;
    }

    public String getStreet1() {
        return street1;
    }

    public void setStreet1(String value) {
        this.street1 = value;
    }

    public String getStreet2() {
        return street2;
    }

    public void setStreet2(String value) {
        this.street2 = value;
    }

    public String getZip() {
        return zip;
    }

    public void setZip(String value) {
        this.zip = value;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String value) {
        this.city = value;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String value) {
        this.country = value;
    }

    public String getVat() {
        return vat;
    }

    public void setVat(String value) {
        this.vat = value;
    }

    @SuppressWarnings({"RedundantIfStatement"})
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Client client = (Client) o;

        if (id != client.id) return false;
        if (city != null ? !city.equals(client.city) : client.city != null) return false;
        if (country != null ? !country.equalsIgnoreCase(client.country) : client.country != null) return false;
        if (name != null ? !name.equalsIgnoreCase(client.name) : client.name != null) return false;
        if (street1 != null ? !street1.equalsIgnoreCase(client.street1) : client.street1 != null) return false;
        if (street2 != null ? !street2.equalsIgnoreCase(client.street2) : client.street2 != null) return false;
        if (vat != null ? !vat.equalsIgnoreCase(client.vat) : client.vat != null) return false;
        if (zip != null ? !zip.equalsIgnoreCase(client.zip) : client.zip != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (id ^ (id >>> 32));
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (street1 != null ? street1.hashCode() : 0);
        result = 31 * result + (street2 != null ? street2.hashCode() : 0);
        result = 31 * result + (zip != null ? zip.hashCode() : 0);
        result = 31 * result + (city != null ? city.hashCode() : 0);
        result = 31 * result + (country != null ? country.hashCode() : 0);
        result = 31 * result + (vat != null ? vat.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        StringBuffer buffer = new StringBuffer();
        buffer.append("XMLClient [");
        buffer.append("id=").append(id);
        buffer.append(", name=").append(name);
        buffer.append(", street1=").append(street1);
        buffer.append(", street2=").append(street2);
        buffer.append(", zip=").append(zip);
        buffer.append(", city=").append(city);
        buffer.append(", country=").append(country);
        buffer.append(", vat=").append(vat);
        buffer.append("]");
        return buffer.toString();
    }
}
